package casa.depesos.app.com.http.req;


import java.util.Map;

import casa.depesos.app.com.http.HttpReq;
import casa.depesos.app.com.http.ReqCallback;
import casa.depesos.app.com.http.bean.GetCodeBean;
import casa.depesos.app.com.http.parser.GetCodeParser;

public class ForgetPwdReq implements HttpReq<GetCodeBean> {
    String phone, pwd, code;

    public ForgetPwdReq(String phone, String pwd, String code) {
        this.phone = phone;
        this.pwd = pwd;
        this.code = code;
    }

    @Override
    public void req(ReqCallback<GetCodeBean> callback) {//  /app/user/forgetPassword
        req("/app/consumer/eraseAccessCredentials", new GetCodeParser(), callback);
    }

    @Override
    public Map getBody() {
        Map map = HttpReq.super.getBody();
        map.put("mobile", phone);
        map.put("authentication", pwd);
        map.put("passwordVerification", pwd);
        map.put("validatiCod", code);
        return map;
    }
}
